<!DOCTYPE html> 
<html lang="ja"> 
  <head> 
    <meta charset="utf-8" /> 
    <title>iBiwaScheme</title>

    <link href="css/jquery.mobile-1.0a2.min.css" rel="stylesheet" type="text/css" />
    <script src="../release/biwascheme.js" type="text/javascript"></script>
    <script src="js/jquery.mobile-1.0a2.min.js" type="text/javascript"></script>
  </head>
  <body>

    <div data-role="page" data-theme="e">
      <div data-role="header">
        <h1>iBiwaScheme</h1>
      </div>

      <div data-role="content">
        <div data-role="fieldcontain">
          <textarea cols=40 rows=8 id="src">(+ 1 2)</textarea>
        </div>
        <label>result:</label>
        <div id="bs-console"></div>
      </div>

      <div data-role="footer">
        <h4>Powered by <a href="../index.html" rel="external">BiwaScheme</a><br>
          version <span id="ver">--</span>
        </h4>
      </div>
    </div>

    <script type="text/javascript">
       $(function(){
          $('#ver').text(BiwaScheme.Version);

          var intp = new BiwaScheme.Interpreter(function(e){
                                                 Console.puts(e);
                                                 });
          $('#src').change(function(){
            $('#bs-console').empty();
            var src = $('#src').val();
            intp.evaluate(src, function(result){
                               Console.puts(result);
                               });
          }).trigger('change');
        })
      </script>
  </body>
</html>
